/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * FrameProyectosKDD.java
 *
 * Created on 2/01/2012, 04:02:23 PM
 */
package gui;


/**
 *
 * @author jorgeorm
 */
public class FrameProyectosKDD extends javax.swing.JFrame {

    /** Creates new form FrameProyectosKDD */
    public FrameProyectosKDD() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jp_panPrincipal = new javax.swing.JPanel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jm_archivo = new javax.swing.JMenu();
        jmi_cargar = new javax.swing.JMenuItem();
        jmi_cargarDatos = new javax.swing.JMenuItem();
        jmi_salir = new javax.swing.JMenuItem();
        jm_vista = new javax.swing.JMenu();
        jmi_consultasPre = new javax.swing.JMenuItem();
        jmi_consultasNoPre = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Datamart SRA ");
        setBounds(new java.awt.Rectangle(0, 0, 0, 0));

        jp_noPredefini=new PanelConsultaNoPredefinida();
        jp_conPredefini= new PanelConsultaPredefinida();

        javax.swing.GroupLayout jp_panPrincipalLayout = new javax.swing.GroupLayout(jp_panPrincipal);
        jp_panPrincipal.setLayout(jp_panPrincipalLayout);
        jp_panPrincipalLayout.setHorizontalGroup(
            jp_panPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 999, Short.MAX_VALUE)
        );
        jp_panPrincipalLayout.setVerticalGroup(
            jp_panPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 549, Short.MAX_VALUE)
        );

        jm_archivo.setText("Archivo");

        jmi_cargar.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.ALT_MASK));
        jmi_cargar.setText("Cargar Archivos");
        jm_archivo.add(jmi_cargar);

        jmi_cargarDatos.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_T, java.awt.event.InputEvent.ALT_MASK));
        jmi_cargarDatos.setText("Cargar Datos");
        jm_archivo.add(jmi_cargarDatos);

        jmi_salir.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.ALT_MASK));
        jmi_salir.setText("Salir");
        jmi_salir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmi_salirActionPerformed(evt);
            }
        });
        jm_archivo.add(jmi_salir);

        jMenuBar1.add(jm_archivo);

        jm_vista.setText("Vista");

        jmi_consultasPre.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P, java.awt.event.InputEvent.ALT_MASK));
        jmi_consultasPre.setText("Consultas Predefinidas");
        jmi_consultasPre.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmi_consultasPreActionPerformed(evt);
            }
        });
        jm_vista.add(jmi_consultasPre);

        jmi_consultasNoPre.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_D, java.awt.event.InputEvent.ALT_MASK));
        jmi_consultasNoPre.setText("Consultas No Predefinidas");
        jmi_consultasNoPre.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmi_consultasNoPreActionPerformed(evt);
            }
        });
        jm_vista.add(jmi_consultasNoPre);

        jMenuBar1.add(jm_vista);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jp_panPrincipal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGap(24, 24, 24)
                .addComponent(jp_panPrincipal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jmi_salirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmi_salirActionPerformed
        System.exit(0);
    }//GEN-LAST:event_jmi_salirActionPerformed

    private void jmi_consultasNoPreActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmi_consultasNoPreActionPerformed
        try{
            this.remove(jp_panPrincipal);
        }catch(java.lang.Exception excp){
            System.out.println("No pude scar el panel Principal");
        }
        try{
            this.remove(jp_conPredefini);
        }catch(java.lang.Exception excp){
            System.out.println("No pude scar el panel de consultas predefinidas");
        }
        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jp_noPredefini, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jp_noPredefini, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        pack();
    }//GEN-LAST:event_jmi_consultasNoPreActionPerformed

    private void jmi_consultasPreActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmi_consultasPreActionPerformed
        try{
            this.remove(jp_panPrincipal);
        }catch(java.lang.Exception excp){
            System.out.println("No pude scar el panel Principal");
        }
        try{
            this.remove(jp_noPredefini);
        }catch(java.lang.Exception excp){
            System.out.println("No pude scar el panel de consultas no predefinido");
        }
        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jp_conPredefini, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jp_conPredefini, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        pack();
    }//GEN-LAST:event_jmi_consultasPreActionPerformed

    /**
     * @param args the command line arguments
     */
//    public static void main(String args[]) {
//        /* Set the Nimbus look and feel */
//        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
//        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
//         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
//         */
//        try {
//            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
//                if ("Nimbus".equals(info.getName())) {
//                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
//                    break;
//                }
//            }
//        } catch (ClassNotFoundException ex) {
//            java.util.logging.Logger.getLogger(FrameProyectosKDD.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (InstantiationException ex) {
//            java.util.logging.Logger.getLogger(FrameProyectosKDD.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (IllegalAccessException ex) {
//            java.util.logging.Logger.getLogger(FrameProyectosKDD.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
//            java.util.logging.Logger.getLogger(FrameProyectosKDD.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        }
//        //</editor-fold>
//
//        /* Create and display the form */
//        java.awt.EventQueue.invokeLater(new Runnable() {
//
//            public void run() {
//                new FrameProyectosKDD().setVisible(true);
//            }
//        });
//    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenu jm_archivo;
    private javax.swing.JMenu jm_vista;
    private javax.swing.JMenuItem jmi_cargar;
    private javax.swing.JMenuItem jmi_cargarDatos;
    private javax.swing.JMenuItem jmi_consultasNoPre;
    private javax.swing.JMenuItem jmi_consultasPre;
    private javax.swing.JMenuItem jmi_salir;
    private javax.swing.JPanel jp_panPrincipal;
    private PanelConsultaNoPredefinida jp_noPredefini;
    private PanelConsultaPredefinida jp_conPredefini;
    // End of variables declaration//GEN-END:variables
}
